package com.kt.app.ui.components


import androidx.compose.foundation.layout.Column
import androidx.compose.material3.RangeSlider
import androidx.compose.material3.Slider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.tooling.preview.Preview

@Composable
fun SilderSample() {

    var value by remember { mutableStateOf(0f) }
    Column {
        Slider(
            value = value,
            onValueChange = { value = it },
            valueRange = 0f..100f,
            steps = 4
            )
        Text(text = "当前值：${value.toInt()}")

    }

}

@Preview
@Composable
fun SilderSamplePreview() {
    SilderSample()
}

